package com.ruoyi.demo.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ruoyi.demo.utils.FlexibleDateDeserializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 拍卖专场对象 auction_session
 *
 * @author metaee
 * @date 2025-03-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("auction_session")
@ApiModel("拍卖专场")
public class AuctionSession extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 专场ID */
    @ApiModelProperty("专场ID")
    @TableId
    private Long sessionId;

    /** 专场名称 */
    @ApiModelProperty("专场名称")
    @Excel(name = "专场名称")
    private String sessionName;

    /** 专场描述 */
    @ApiModelProperty("专场描述")
    private String sessionDesc;

    /** 专场封面图片 */
    @ApiModelProperty("专场封面图片")
    @Excel(name = "专场封面图片")
    private String coverImage;

    /** 专场图片(逗号隔开) */
    @ApiModelProperty("专场图片")
    private String images;

    /** 专场开始时间 */
    @ApiModelProperty("专场开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = FlexibleDateDeserializer.class)
    @Excel(name = "专场开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 专场结束时间 */
    @ApiModelProperty("专场结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = FlexibleDateDeserializer.class)
    @Excel(name = "专场结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 主分类ID */
    @ApiModelProperty("主分类ID")
    @Excel(name = "主分类ID")
    private Long categoryId;

    /** 默认规则ID */
    @ApiModelProperty("默认规则ID")
    @Excel(name = "默认规则ID")
    private Long ruleId;

    /** 状态（状态 0待开始 1竞拍中 2已结束） */
    @ApiModelProperty("状态")
    @Excel(name = "状态", readConverterExp = "状态 0待开始 1竞拍中 2已结束")
    private String status;

    /** 作者简介 */
    @ApiModelProperty("作者简介")
    @Excel(name = "作者简介")
    private String authorDesc;

    /** 拍品简介 */
    @ApiModelProperty("拍品简介")
    @Excel(name = "拍品简介")
    private String itemDesc;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("sessionId", getSessionId())
            .append("sessionName", getSessionName())
            .append("sessionDesc", getSessionDesc())
            .append("coverImage", getCoverImage())
            .append("images", getImages())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("categoryId", getCategoryId())
            .append("ruleId", getRuleId())
            .append("status", getStatus())
            .append("authorDesc", getAuthorDesc())
            .append("itemDesc", getItemDesc())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
